<?php
/**
 * 获取
 *
 *
 */

use Workerman\Worker;
use Workerman\Mysql;

class get_department{

    public function entry($param){

        return $this->do_get_department($param);
    }

    private function do_get_department($param){

            $sql = "SELECT id,name FROM hf_mes_department";
            $ret=sql_query($sql);

        return array("errcode"=>0, "errmsg"=>"", "rtval"=>$ret);

    }



    /**
     * create
     * 通过 call_user_func 获得本class的实例
     *
     * @access public
     * @since 1.0
     * @return object 本类的实例
     */
    public static function create(){
        static $instance;
        if (!$instance){
            $instance = new get_department();
        }
        return $instance;
    }
}


?>